package com.ccys.cms.controller.healthScreening;

import com.ccys.cms.service.healthScreening.TblPatientBiometricsUploadWebService;
import com.ccys.common.constants.ContextConstants;
import com.ccys.common.util.Kit;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.healthScreening.TblPatientBiometricsUploadDTO;
import com.ccys.db.entity.TblPatientBiometricsUpload;
import com.ccys.db.vo.healthScreening.TblPatientBiometricsUploadWebVO;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@Api(tags = "健康检查-AIA集体体检报告")
@RequestMapping("healthScreening")
@CrossOrigin(methods = {RequestMethod.GET, RequestMethod.POST, RequestMethod.DELETE, RequestMethod.PUT}) // 开启跨域访问允许
@SuppressWarnings("unchecked")
public class PatientBiometricsUploadWebController {

    @Autowired
    private TblPatientBiometricsUploadWebService tblPatientBiometricsUploadWebService;

    @GetMapping("patientBiometricsUpload")
    @ApiOperation("获取列表")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "name", value = "name", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "nricNo", value = "nricNo", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "email", value = "email", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "contactNo", value = "contactNo", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "companyName", value = "companyName", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "aiaVitalityNo", value = "aiaVitalityNo", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "gender", value = "gender", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "status", value = "status", required = false, dataType = "string", paramType = "query"),

        @ApiImplicitParam(name = "id", value = "对象id", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "startTimeUploadedAt", value = "Uploaded开始时间(格式 yyyy-mm-dd)", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "endTimeUploadedAt", value = "Uploaded结束时间(格式 yyyy-mm-dd)", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "startTimeDateOfScreening", value = "Screening开始时间(格式 yyyy-mm-dd)", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "endTimeDateOfScreening", value = "Screening结束时间(格式 yyyy-mm-dd)", required = false, dataType = "string", paramType = "query"),
        @ApiImplicitParam(name = "orderByStr", value = "排序字段（后端返回的字段  asc升序，desc 降序,加上end后缀。示例（createdOn降序排 则传值 createdOn descend））",paramType = "query"),
    })
    @ApiResponses({
        @ApiResponse(code = 411, message = ContextConstants.DESC_411),
        @ApiResponse(code = 200, message = ContextConstants.MODEL_DESC,response = TblPatientBiometricsUploadWebVO.class)
    })
    public ResponseResult listObjectsCms(HttpServletRequest request, HttpServletResponse response, @ApiIgnore TblPatientBiometricsUploadDTO dto) {
        return this.tblPatientBiometricsUploadWebService.listObjectsCms(request, response, dto);
    }







}